//
//  SeoSouTopView.m
//  QT
//
//  Created by 甘世清 on 2025/1/1.
//

#import "SeoSouTopView.h"

@implementation SeoSouTopView

- (void)SQ_UIViewForSelfView{
    [self addSubview:self.nameTextField];
    [self.nameTextField mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(20);
            make.bottom.equalTo(self.mas_bottom);
            make.right.equalTo(self.mas_right).offset(-20);
            make.height.mas_equalTo(44);
    }];
}

- (UITextField *)nameTextField{
    if (!_nameTextField) {
        _nameTextField = [[UITextField alloc]init];
//        _nameTextField.textAlignment = NSTextAlignmentCenter;
        _nameTextField.font = FONT_MEDIUM(14);
        _nameTextField.placeholder = SQNSLocalString(@"试试输入点什么~");
        _nameTextField.textColor = SQColor(@"#000000");
        _nameTextField.backgroundColor = SQColorF5F5F5;
        _nameTextField.layer.cornerRadius = 22;
        _nameTextField.layer.masksToBounds = YES;
        _nameTextField.returnKeyType = UIReturnKeyDone;
        UIView * bgView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 40, 36)];
        UIImageView * lefe = [[UIImageView alloc]initWithFrame:CGRectMake(20, 10, 16, 16)];
        lefe.image = SQGetImage(@"sousuo");
        lefe.contentMode = UIViewContentModeScaleAspectFit;
        [bgView addSubview:lefe];
        _nameTextField.leftViewMode = UITextFieldViewModeAlways;
        _nameTextField.leftView = bgView;
    }
    return _nameTextField;
}
@end
